Converts any string or numeric expression to an integer.
文字列および数値表式を、整数値に変換します。
CInt (Expression)
CInt (Expression)
Integer
整数
Expression: Any numeric expression that you want to convert. If the Expression exceeds the value range between -32768 and 32767, Office Basic reports an overflow error. To convert a string expression, the number must be entered as normal text ("123.5") using the default number format of your operating system.
Expression: 変換させる数値表式。Expression の値が -32768 から 32767 の範囲に収まらない場合、Office Basic はオーバーフローエラーを出します。また文字列を変換する場合は、オペレーティングシステムが標準で使用する数の書式 (「123.5」など) でテキストを指定する必要があります。
This function always rounds the fractional part of a number to the nearest integer.
この関数で小数を変換すると、常に数値の小数部を丸めた整数値が返されます。
Sub ExampleCountryConvert
Sub ExampleCountryConvert
Msgbox CDbl(1234.5678)
Msgbox CDbl(1234.5678)
Msgbox CInt(1234.5678)
Msgbox CInt(1234.5678)
Msgbox CLng(1234.5678)
Msgbox CLng(1234.5678)
end sub
end sub